using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using BO.Admin;
using BO;

namespace GUI.Controls.Category
{
    public partial class ListCategory : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            BindData();
        }

        private void BindData()
        {
            DataTable dt = Category_Helper.Get(Utils.QueryString.GetCategoryID());
            if (dt != null && dt.Rows.Count > 0)
            {
                Page.Title = dt.Rows[0]["Category_Name"].ToString() + PublicConstants.COMMON_TITLE;
            }
            rptListCategory.DataSource = null;
            rptListCategory.DataSource = News_Helper.GetByCategory(Utils.QueryString.GetCategoryID());
            rptListCategory.DataBind();
        }
    }
}